Ext.define('Admin.view.overtimefile.OvertimeFileGrid', {
    extend: 'Ext.grid.Panel',
    id: 'overtimeFileGrid',
    xtype: 'overtimeFileGrid',

    requires: [
        'Ext.button.Segmented',
        'Ext.list.Tree'
    ],

    title: '加班归档',

    layout: 'fit',
    defaults: {
        anchor: '80%'
    },


    scrollerble: true,
    bind: '{overtimeFileFormLists}',
    columns: [
        { text: '申请人', dataIndex: 'name', width: 60, sortable: true },
        { text: '所属部门', dataIndex: 'department', width: 100, sortable: true },
        { text: '申请时间', dataIndex: 'applicationTime', width: 150, sortable: true, renderer: Ext.util.Format.dateRenderer('Y/m/d H:i:s') },
        { text: '实际开始时间', dataIndex: 'realBeginDate', width: 150, sortable: true, renderer: Ext.util.Format.dateRenderer('Y/m/d H:i:s') },
        { text: '实际结束时间', dataIndex: 'realEndDate', width: 150, sortable: true, renderer: Ext.util.Format.dateRenderer('Y/m/d H:i:s') },
        { text: '实际加班时长', dataIndex: 'realTotalTime', width: 85, sortable: true },
        { text: '加班原因', dataIndex: 'reason', sortable: true },
        {
            text: '操作',
            xtype: 'actioncolumn',
            items: [{
                xtype: 'button',
                iconCls: 'x-fa fa-pencil-square-o',
                tooltip: '归档',
                handler: 'openOvertimeFileWindow'
            }]
        }
    ],

    bbar: Ext.create('Ext.PagingToolbar', {
        bind: '{overtimeFileFormLists}',
        displayInfo: true,
        displayMsg: 'Displaying topics {0} - {1} of {2}',
        emptyMsg: "没有任何数据",

    })
});
